package cn.bdqn.service.impl;

import cn.bdqn.mapper.AppInfoMapper;
import cn.bdqn.mapper.AppVersionMapper;
import cn.bdqn.service.DelService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Transactional
@Service
public class DelServiceImpl implements DelService {
    @Resource
    private AppInfoMapper appInfoMapper;
    @Resource
    private AppVersionMapper appVersionMapper;

    @Override
    public boolean del(Integer aid) {
        boolean flag = false;
        if (appVersionMapper.delVersion(aid) > 0) {
            flag = true;
        }
        if (appInfoMapper.delAppInfo(aid) > 0) {
            flag = true;
        }
        return flag;
    }
}
